package cn.izeno.wx

import cn.izeno.wx.service.WX
import org.junit.Test
import org.slf4j.LoggerFactory
import java.io.File

class MediaTest {

  var err: Throwable? = null
  val logger = LoggerFactory.getLogger(this::class.java.name)

  @Test
  fun testUploadMedia() {
    val file = File("/Users/zenochan/Z.Project/service/_inbox/wxopen/uploader/2019/07/1561966767424.jpg");
    WX.mp.uploadMedia(file, APP_TOKEN).subscribe { logger.info(it.prettyJson()) }

    assert(err == null)

  }
}